x86/shadow: don't use map_domain_page_global() on paths that may not fail
authorJan Beulich <jbeulich@suse.com>
Tue, 26 Feb 2019 15:56:26 +0000 (16:56 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 26 Feb 2019 15:56:26 +0000 (16:56 +0100)
commit43282a5e64da26fad544e0100abf35048cf65b46
tree36adc241fe9377bf1e442ee725e6edfc23688d48
parentce98ee3050a824994ce4957faa8f53ecb8c7da9d
x86/shadow: don't use map_domain_page_global() on paths that may not fail

The assumption (according to one comment) and hope (according to
another) that map_domain_page_global() can't fail are both wrong on
large enough systems. Do away with the guest_vtable field altogether,
and establish / tear down the desired mapping as necessary.

The alternatives, discarded as being undesirable, would have been to
either crash the guest in sh_update_cr3() when the mapping fails, or to
bubble up an error indicator, which upper layers would have a hard time
to deal with (other than again by crashing the guest).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/arch/x86/mm/shadow/multi.c
xen/include/asm-x86/domain.h